<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="fragments/head::head"/>
<link rel="stylesheet" th:href="@{/assets/css/colorbox.css}"/>
<link rel="stylesheet" th:href="@{/assets/css/fixedColumns.dataTables.css}"/>
<link rel="stylesheet" th:href="@{/assets/css/jquery.dataTables.min.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/assets/css/chosen.css}"/>
<style type="text/css">
    .error {
        color: #F00
    }

    .DTFC_LeftBodyLiner {
        height: 910px ! important;
    }

    #sample-table-2_paginate span {
        background-color: #FFFFFF;
    }
</style>
<body style='overflow:visible ! important;'>
<div th:include="fragments/top::top"></div>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <div th:include="fragments/left::left" class="sidebar" id="sidebar"></div>
        <div class="main-content">
            <!--<div class="breadcrumbs" id="breadcrumbs">-->
            <!--<ul class="breadcrumb">-->
            <!--<li>首页</li>-->
            <!--<li>学生管理</li>-->
            <!--<li>学生列表</li>-->
            <!--&lt;!&ndash;<li class="active">内容列表</li>&ndash;&gt;-->
            <!--</ul>-->
            <!--</div>-->
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">结案学生列表</h3>
                                <input type="hidden" name="applyId" id="applyId"
                                       th:value="${#httpServletRequest.getParameter('applyId')}"/>
                                <input type="hidden" name="studentNo" id="studentNo"
                                       th:value="${#httpServletRequest.getParameter('studentNo')}"/>

                                <input type="hidden" name="isAuditor" id="isAuditor" th:value="1"/>
                                <input type="hidden" name="oaid" id="oaid" th:value="${oaid}"/>
                                <input type="hidden" name="status" id="status" th:value="${status}"/>
                                <input type="hidden" name="roleName" id="roleName" th:value="${roleName}"/>

                                <shiro:hasPermission name="visit:list">
                                    <input type="hidden" id="input_hasPermission_visit_list" value="1"/>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="visaApply:list">
                                    <input type="hidden" id="input_hasPermission_visaApply_list" value="1"/>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="两次寄出绩效审核">
                                    <input type="hidden" id="doubleSendingConfirm" value="1"/>
                                </shiro:hasPermission>

                                <shiro:hasRole name="文案经理">
                                    <input type="hidden" id="role_copyManager" value="1"/>
                                </shiro:hasRole>
                                <shiro:hasRole name="签证经理">
                                    <input type="hidden" id="role_visaManager" value="1"/>
                                </shiro:hasRole>
                                <shiro:hasRole name="文签总监">
                                    <input type="hidden" id="role_director" value="1"/>
                                </shiro:hasRole>

                                <div class="table-header">
                                    <form class="form-inline">
                                        <div class="form-group">

                                            <label for="sNo">学号：</label>
                                            <input type="text" id="sNo" class="form-control input-sm"
                                                   th:value="${#httpServletRequest.getParameter('studentNo')}"
                                                   placeholder="" style="width:60px;" onkeyup="changeTable()"/>
                                            <label for="sName">姓名/拼音：</label>
                                            <input type="text" id="sName" class="form-control input-sm" placeholder=""
                                                   style="width:60px;" onkeyup="changeTable()"/>

                                        </div>
                                        <div class="form-group">
                                            <label for="sStatus">结案原因：</label>
                                            <select type="" class="form-control input-sm" id="sStatus"
                                                    style="width:100px;" onchange="changeTable()">
                                                <option value="">请选择</option>
                                                <option value="1">单文书结案</option>
                                                <option value="2">单申请结案</option>
                                                <option value="3">其他</option>
                                                <option value="4">自动结案</option>
                                                <option value="5">退费结案</option>
                                                <option value="6">套磁结案</option>
                                            </select>
                                            <div class="form-group">
                                            <label>审批通过日期：</label>
                                            <input id="dateStart" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                                   style="width: 160px;margin:5px 0;height:27px;"
                                                    required="required"/>
                                            --
                                            <input id="dateEnd" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                                   style="width: 160px;margin:5px 0;height:27px;"
                                                    required="required"/>
                                            </div>

                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<input type="hidden" name="dateStartString" id="dateStart"/>-->
                                            <!--<input type="hidden" name="dateEndString" id="dateEnd"/>-->

                                        <!--</div>-->
                                        <button type="button" id="query" class="btn btn-success"
                                                onclick="changeTable()">查询
                                        </button>
                                        <button  class="btn btn-warning">清空</button>
                                    </form>

                                </div>


                                <div class="table-responsive">
                                    <div id="alert" class="alert alert-success" style="display: none;" role="alert">
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                        <span id="alertText"></span>
                                    </div>
                                    <table id="sample-table-2" class="table table-striped table-bordered table-hover"
                                           style="white-space: nowrap;">
                                        <thead>
                                        <tr>
                                            <th>学号</th>
                                            <th>姓名</th>
                                            <th>拼音</th>
                                            <th>出生日期</th>
                                            <th>进程</th>
                                            <th>国家</th>
                                            <th>合同名称</th>
                                            <th>咨询顾问</th>
                                            <th>文签顾问</th>
                                            <th>结案原因</th>
                                            <th>旧系统结案原因</th>
                                        </tr>
                                        </thead>
                                    </table>
                                    <!--</div>-->
                                    <!--</div>-->
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>

        <div th:include="fragments/bottom::bottom"></div>
    </div>

    <a href="#" id="btn-scroll-up"
       class="btn-scroll-up btn btn-sm btn-inverse"> <i
            class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>
<!-- /.main-container -->

<!-- Modal备注 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content"></div>
    </div>
</div>
<div th:include="fragments/js::js"></div>

<script charset="UTF-8" th:src="@{/assets/js/jquery.validate.min.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/jquery.validate.zh-CN.js}"></script>
<!-- page specific plugin scripts -->
<script charset="UTF-8" th:src="@{/assets/js/1.10.15/jquery.dataTables.min.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/1.10.15/pagination.input.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/jquery.dataTables.bootstrap.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/dataTables.fixedColumns.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/temp.js}"></script>
<!--图片查看器-->
<script charset="UTF-8" th:src="@{/assets/js/jquery.colorbox-min.js}"></script>
<script charset="UTF-8" th:src="@{/layer/layer.js}"></script>
<script charset="UTF-8" th:src="@{/My97DatePicker/WdatePicker.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/chosen.jquery.min.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/date-time/bootstrap-datepicker.min.js}"></script>
<script charset="UTF-8" th:src="@{/assets/js/date-time/bootstrap-timepicker.min.js}"></script>
<script charset="UTF-8" th:src="@{/business/student/studentList.js}"></script>
</body>
<!--<script th:src="@{/assets/js/date-time/moment.min.js}"></script>-->
<script type="text/javascript">
    <!--
    var oTable1;
    $("#sStatus").val($("#status").val());

    jQuery(function ($) {

        oTable1 = $('#sample-table-2').dataTable({

            "bFilter" : false,//是否使用搜索
            "bProcessing" : true,
            "bDeferRender" : true,//
            "sPaginationType" : "bs_normal",//分页样式
            "bRetrieve" : true,//是否调用后台
            "bServerSide" : true,//是否以后台分页
            "bAutoWidth": true,
            "sAjaxSource": "/settleList_query",//请求路径
            "fnServerData": function (sSource, aoData, fnCallback) {
                aoData.push(
                    {name: 'studentNo', value: $("#sNo").val() == "" ? null : $.trim($("#sNo").val())},
                    {name: 'studentName', value: $("#sName").val() == "" ? null : $.trim($("#sName").val())},
                    {
                        name: 'studentStatus',
                        value: $("#sStatus").find("option:selected").val() == "" ? null : $("#sStatus").find("option:selected").val()
                    },
                    {name: 'dateStart', value: $("#dateStart").val() == "" ? null : $.trim($("#dateStart").val())},
                    {name: 'dateEnd', value: $("#dateEnd").val() == "" ? null : $.trim($("#dateEnd").val())}

                )
                $.ajax({
                    "dataType": 'json',
                    "type": "POST",
                    "url": sSource,
                    "data": aoData,
                    "success": fnCallback
                });
            },
            // "aaSorting": [[0, "desc"]],
            "bSort": true,
            "aoColumns": [
                {
                    "sClass": "center", "bSortable": false, "mData": function (data) {
                    var studentDetail = '<a class="blue" href="javascript:void(0);" onclick="toStudentDetail(\'' + data.studentNo + '\')">' + data.studentNo + '</a>';
                    return studentDetail;
                }
                },
                {"sClass": "center", "bSortable": false, "mData": "studentName"},
                {"sClass": "center", "bSortable": false, "mData": "pinyin"},
                {"sClass": "center", "bSortable": false, "mData":
                    function (data) {
                        if (data.birthday != null) {
                            return getTimeString_day(new Date(data.birthday))
                        } else {
                            return "";
                        }
                    }},
                {"sClass": "center", "bSortable": false, "mData":
                    function (data) {
                        if (data.status == 10) {
                            return "未上传文书材料";
                        } else if (data.status == 20) {
                            return "未递交申请材料";
                        } else if (data.status == 30) {
                            return "未收到申请结果";
                        } else if (data.status == 40) {
                            return "未确认录取院校";
                        } else if (data.status == 50) {
                            return "未进行签证辅导";
                        } else if (data.status == 60) {
                            return "未递交签证申请";
                        } else if (data.status == 70) {
                            return "未收到签证结果";
                        } else if (data.status == 80) {
                            return "未填写获签信息";
                        } else if (data.status == 90) {
                            return "已结案";
                        } else if (data.status == 100) {
                            return "已退费";
                        } else if (data.status == 85) {
                            return "待结案";
                        } else {
                            return "";
                        }

                    }},
                {
                    "sClass": "center", "bSortable": false, "mData":
                    function (data) {
                        if (data.nationName == "美高") return "美国";
                        if (data.nationName == "美普") return "美国";
                        else return data.nationName;
                    }
                },
                {"sClass": "center", "bSortable": false, "mData": "contractNo"},
                {"sClass": "center", "bSortable": false, "mData": "salesConsultant"},
                {"sClass": "center", "bSortable": false, "mData": "copyOperator"},
                {"sClass": "center", "bSortable": false, "mData":
                    function (data) {
                        if (data.studentStatus == 1) {
                            return "单文书结案";
                        } else if (data.studentStatus == 2) {
                            return "单申请结案";
                        } else if (data.studentStatus == 3) {
                            return "其他";
                        } else if (data.studentStatus == 4) {
                            return "自动结案";
                        } else if (data.studentStatus == 5) {
                            return "退费结案";
                        } else if (data.studentStatus == 6) {
                            return "套磁结案";
                        } else {
                            return "";
                        }

                    }},
                {"sClass": "center", "bSortable": false, "mData": "branchName"}

            ],
            "oLanguage": {
                "sLengthMenu": "每页 _MENU_条 ",
                "sZeroRecords": "对不起，查询不到任何相关数据",
                "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录 ",
                "sInfoEmpty": "显示 0 到 0 条，共 0 条记录",
                "sInfoFiltered": "数据表中共为 _MAX_ 条记录)",
                "sProcessing": "正在加载中...",
                "sSearch": "搜索",
                "sUrl": "", //多语言配置文件，可将oLanguage的设置放在一个txt文件中，例：Javascript/datatable/dtCH.txt
                "oPaginate": {
                    "sFirst": "第一页",
                    "sPrevious": " 上一页 ",
                    "sNext": " 下一页 ",
                    "sLast": " 最后一页 "
                }
            }
            //多语言配置

        });


        //页面响应回车事件
        $(document).keyup(function (e) {//捕获文档对象的按键弹起事件
            if (e.keyCode == 13) {//按键信息对象以参数的形式传递进来了
                $("#query").click();
            }
        });

        $("#empty").click(function () {
            $("#selectNation").empty();
            $("#selectBranch").empty();
            $("#dateStart").val("");
            $("#dateEnd").val("");
            $("#visaSendDate_Start").val("");
            $("#visaSendDate_End").val("");
            $("#visaOperatorDate_Start").val("");
            $("#visaOperatorDate_End").val("");
            location.href = '/settleList';
        })

        function getTimeString_day(date) {
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            m = m >= 10 ? m : '0' + m;
            var d = date.getDate();
            d = d >= 10 ? d : '0' + d;
            return y + '-' + m + '-' + d;
        }

    })

    function changeTable() {
        oTable1.fnDraw()
    }

    -->

</script>

</html>
